1 Field of the Invention
The present invention relates to an image processing apparatus, and particularly to a technique for decreasing deterioration of image quality in an image forming apparatus that forms an image based on digital image data.
2 Description of Related Art
In image forming apparatuses that forman image based on digital image data, various image processing such as smoothing and edge enhancement is generally employed to improve image quality. Such image processing is performed on pixels of image data in accordance with an image type, examples of which include a character image and a halftone-dot image. To be more specific, a pixel that is judged to be in a halftone-dot area is typically subjected to smoothing, and a pixel that is judged to be in an edge area of a character is typically subjected to edge enhancement.
Here, the following describes an example of a method for judging whether each of pixels included in image data is in a halftone-dot area or not, disclosed in the Japanese published unexamined application 2000-59615. Each pixel is set as a target pixel to be judged, and the first judgment is performed as to whether the target pixel is an isolated pixel or not, using a filter with a size of 5*5 pixels. Then, the second judgment is performed as to whether the target pixel is in a halftone-dot area or not, by counting the number of isolated pixels present in a predetermined area including the target pixel. According to this method, an isolated pixel detection filter is used in the first judgment, an example of which is a filter with a size of 5*5 pixels shown in FIG. 1. Brightness data of each pixel is made to pass through this isolated pixel detection filter, and the judgment is performed as to whether the target pixel is an isolated pixel, by judging whether the relationship between brightness of the target pixel “V33” and brightness of nearby pixels satisfies a predetermined condition.
Following this, the second judgment as to whether the target pixel is in a halftone-dot area is performed, by counting the number of isolated pixels present in a predetermined area such as an area consisting of 9 (vertical)*45 (horizontal) pixels. To be more specific, when the count number of isolated pixels is above a predetermined threshold, the target pixel is judged to be in a halftone-dot area.
However, the above conventional image processing apparatuses have the problem that a judgment of a halftone-dot area may not be performed correctly due to resolution of a halftone-dot area or due to the existence of a character in a halftone-dot area.
Here, the following briefly describes the meaning of the term “resolution” of a halftone-dot image. For a halftone-dot image, resolution can be defined by the number of halftone-dots present in a predetermined area. Density (gradation) of the halftone-dot area depends on a total area occupied by a plurality of halftone-dots included therein. In general, when two halftone-dot images with different resolution have the same density, the halftone-dot image with lower-resolution (where a distance between the center of one halftone-dot to the center of an adjacent halftone-dot is larger) includes halftone-dots of a larger size, and the halftone-dot image with higher-resolution (where a distance between the center of one halftone-dot to the center of an adjacent halftone-dot is smaller) includes halftone-dots of a smaller size.
The following describes the problem, with reference to FIG. 2. In the figure, the horizontal axis indicates resolution of a halftone-dot area, or a size of a character, and the vertical axis indicates the number of isolated pixels to be detected by the method using the isolated pixel detection filter shown in FIG. 1. A curve 901 indicates the relationship between resolution of a halftone-dot area and the number of isolated pixels to be detected, in the case of a halftone-dot image. A curve 902 indicates the relationship between a size of a character and the number of isolated pixels to be detected, in the case of a character image.
Assuming the number of isolated pixels “A” to be a threshold for a judgment of a halftone-dot image, a halftone-dot area can be judged correctly as a halftone-dot area in a range “B” in the figure. However, beyond the range “B”, i.e., when a halftone-dot is smaller than the size range “B”, a halftone-dot area cannot be judged correctly as a halftone-dot area.
If a halftone-dot area is not judged correctly as described above, image processing suitable for a halftone-dot area, an example of which is smoothing, may not be performed appropriately. This may cause image quality to deteriorate.
On the other hand, when a character is present in a halftone-dot area, pixels constituting a character part are not judged as isolated pixels in general. Therefore, when pixels in a halftone-dot area in a close vicinity of a character are judged, a count number of pixels judged as isolated pixels may turn out to be below a predetermined threshold. Accordingly, such a halftone-dot area may not be judged correctly as a halftone-dot area.